package com.boot.main.mapper;

import com.boot.main.entity.CcomPermission;
import com.boot.main.response.ResponseData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
@Repository
public interface CcomPermissionMapper {
    List<CcomPermission> getPermissions(@Param("currentSize") Integer currentSize, @Param("limit") Integer limit, @Param("name") String name);
    List<CcomPermission> getPermissionsByMenuId(@Param("menu_id") Long menu_id);
    int getTotalCount();
    int savePermission(CcomPermission permission);
    int savePermissions(@Param("permissions") List<CcomPermission> permissions);
    int updatePermission(CcomPermission permission);
    int deletePermission(Long id);
}
